package cn.ml.duoXianCheng.threadDemo;

public class XianChengDemo1 {
    public static void main(String[] args) {

        //1.获取主线程对象
        Thread t = Thread.currentThread();
        System.out.println("当前线程是："+t.getName());
        t.setName("My");//设置线程名
        System.out.println("当前线程是："+t.getName());





    }
}
